Skip to main content

Task Report Push

Register a callback, you will receive task report in real time.

To register a callback, you just need provide the callback.

The callback contains url and appId which is for authentication. The url like https://{{host}}/xx/xx. The appId like "24416c36-d9c7-4d74-a047-d6ca461fxxxx". In addition, the http method should be post.

Then your callback will be invoked immediately when a task report is generated.

Demo curl:

curl --location 'https://{{host}}/xx/xx' \
--header 'accept: */*' \
--header 'Content-Type: application/json' \
--data '{ 
  "appId": "24416c36-aaaa-4d74-aaaa-d6ca461faaaa", 
  "payload": { 
    "serialNumber": "TEST00-0000-000-XXXX", 
    "modelTypeCode": "Scrubber S1", 
    "taskReport": { 
      "id": "684c183c-4ad9-467b-ac7c-55835255AAAA", 
      "taskId": "233123123-d9c7-4d74-a047-d6ca461faaaa",
      "planId": "233123123-d9c7-4d74-a047-d6ca461faaaa",
      "taskInstanceId": "893cbadf-3bb1-45be-b7ef-d590d54fAAAA", 
      "displayName": "ceshi2", 
      "startTime": 1714124784000, 
      "endTime": 1714124890000, 
      "robot": "S2153", 
      "robotSerialNumber": "TEST00-0000-000-xxxx", 
      "operator": "admin", 
      "completionPercentage": 0.156, 
      "durationSeconds": 106, 
      "plannedCleaningAreaSquareMeter": 67.425, 
      "actualCleaningAreaSquareMeter": 10.548, 
      "efficiencySquareMeterPerHour": 407.965, 
      "plannedPolishingAreaSquareMeter": null, 
      "actualPolishingAreaSquareMeter": null, 
      "waterConsumptionLiter": 0.0, 
      "startBatteryPercentage": 38.0, 
      "endBatteryPercentage": 38.0, 
      "consumablesResidualPercentage": { 
        "brush": 100.0, 
        "filter": 100.0, 
        "suctionBlade": 100.0 
      }, 
      "cleaningMode": "清扫", 
      "taskEndStatus": 1, 
      "subTasks": [ 
        { 
          "mapId": "370192bd-fe7f-40d0-8d0a-4360415bb8cf", 
          "mapName": "ceshi2", 
          "actualCleaningAreaSquareMeter": 10.548,
          "taskId": "233123123-d9c7-4d74-a047-d6ca461faaaa"
        } 
      ], 
      "taskReportPngUri": "https://bot.release.gs-robot.com/robot-task/task/report/png/v2/en/684c183c-4ad9-467b-ac7c-55835255aaaa" 
    } 
  } 
}'

Parameter description:

field namefield typefiled descriptionexample
appIdStringfor authentication"24416c36-d9c7-4d74-a047-d6ca461fxxxx"
payloadObjectincident message content
payload.serialNumberStringrobot serial number"TEST00-0000-000-XXXX"
payload.modelTypeCodeStringrobot model type code"Scrubber 50H"
payload.taskReportObjecttask report
payload.taskReport.idStringThe task id"24416c36-d9c7-4d74-a047-d6ca461faaaa"
payload.taskReport.taskInstanceIdStringThe task instance id."32803b4c-7a58-45c5-a1e4-e636e89baaaa"
payload.taskReport.taskIdStringThe static task id."32803b4c-7a58-45c5-a1e4-e636e89baaaa"
payload.taskReport.planIdStringThe scheduling plan id."32803b4c-7a58-45c5-a1e4-e636e89baaaa"
payload.taskReport.displayNameStringTask human-readable name."Task on 10th floor"
payload.taskReport.startTimeLongTask start time. timestamp. unit: millisecond1714290913000
payload.taskReport.endTimeLongTask end time. timestamp. unit: millisecond1714290952000
payload.taskReport.robotStringRobot human-readable name."S2153"
payload.taskReport.robotSerialNumberStringThe robot serial number"GS000-XXXX-XXX-XXXX"
payload.taskReport.operatorStringTask operator."Mike"
payload.taskReport.completionPercentageDoubleTask completion percentage. range 0-1.0.55
payload.taskReport.durationSecondsIntegerTask duration seconds.300
payload.taskReport.plannedCleaningAreaSquareMeterDoublePlanned cleaning area(m*2).200.5
payload.taskReport.actualCleaningAreaSquareMeterDoubleActual cleaning area(m*2).100.2
payload.taskReport.efficiencySquareMeterPerHourDoubleCleaning efficiency(m*2/h).300.7
payload.taskReport.plannedPolishingAreaSquareMeterDoublePlanned polishing area(m*2).200.5
payload.taskReport.actualPolishingAreaSquareMeterDoubleActual polishing area(m*2).200.5
payload.taskReport.waterConsumptionLiterDoubleWater consumption(L) during task.5.0
payload.taskReport.startBatteryPercentageDoubleTask start battery percentage. range 0-10070.0
payload.taskReport.endBatteryPercentageDoubleTask end battery percentage. range 0-10040.0
consumablesResidualPercentageObjectPercentage of consumables remaining
consumablesResidualPercentage.brushDoubleBrush remaining life percentage50.0
coumablesResidualPercentage.filterDoubleFilter remaining life percentage50.0
coumablesResidualPercentage.suctionBladeDoubleSuction blade remaining life percentage50.0
cleaningModeStringThe cleaning mode.sweep
taskEndStatusIntegerTask end status. -1: unknown. 0: normal end. 1: manual end. 2: abnormal end. 3: startup failure0
subTasksArraySub tasks list
subTasks[0].mapIdStringThe map id."370192bd-fe7f-40d0-8d0a-4360415baaaa"
subTasks[0].mapNameStringThe map name."test_map"
subTasks[0].actualCleaningAreaSquareMeterDoubleActual cleaning area(m*2).10.0
subTasks[0].taskIdDoubleThe sub task Id."32803b4c-7a58-45c5-a1e4-e636e89baaaa"
taskReportPngUriStringThe task report png uri."https://bot.gs-robot.com/robot-task/task/report/png/v2/en/47e3628b-a2b9-4124-bbbc-45e0d4bfaaaa"